/*
 * Copyright 2013 Agustina Martinez-Garcia

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package uk.ljmu.qudexapps.xmllib.services;

import java.io.IOException;
import java.io.InputStream;

import uk.ljmu.metadata.schemas.SchemaInstanceContainer;
import uk.ljmu.metadata.utilities.MetadataUtilities;
import uk.ljmu.qudexapps.xmllib.model.SpreadsheetMap;
/**
 * Spreadsheet Interface - management of CSV, Excel spreadsheets
 * @author agustinamartinez
 *
 */
public interface SpreadsheetManagement {
	public boolean readSpreadsheet(InputStream inputStream) throws Exception;
	public SchemaInstanceContainer getSchemaInstanceContainer();
	public String constructDocument(String identifier, MetadataUtilities.ValueType typeValidation, String objectPID);
	public String getMimeType(int type, String path) throws IOException;
	public void cleanInstance();
	public Object getPidFromSpreadsheet(Object cmap);
	public void setQudexSS(boolean value);
	public boolean isQudexSS();
	//DATA Management
	public SpreadsheetMap getSpreadsheetMap();
	public Object getColumnMap(Object rowItem);
	public Object getColumnByIdentifier(Object rowIdentifier, Object columnIdentifier);
	public Object getRowColumnValue(Object rowIdentifier, Object column);
	//Access to individual data
	public String returnStringCellContent(Object cell);	
	public String getCellString(Object cell);
	public String getCellContent(Object rowItem, Object columnItem);
}
